package com.zy.experience_system.repository;

import com.zy.experience_system.entity.StuHomework;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Transactional;

import java.util.Collection;
import java.util.List;

public interface StuHomeworkRepository extends JpaRepository<StuHomework,Integer> {
    List<StuHomework> findAllByStuId(String stuId);
    @Transactional
    void deleteAllByTestIdAndSetId(Integer testId,Integer setId);
    List<StuHomework> findAllByStuIdAndSetId(String stuId,Integer setId);
    List<StuHomework> findAllByTestIdAndSetId(Integer testId,Integer setId);
    Integer countAllByTestIdAndSetIdAndFinish(Integer testId,Integer setId,String finish);
}
